package com.assistant.market.modules.market.adapter.web.model;

import com.assistant.market.modules.market.domain.MarketIssue;
import lombok.Data;

@Data
public class MarketIssueInfo {

    /**
     * id
     */
    private Long id;

    /**
     * 标题
     */
    private String title;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 解决办法
     */
    private String resolve;

    /**
     * 作者
     */
    private String author;

    /**
     * 评论
     */
    private String comments;

    public static MarketIssueInfo createBy(MarketIssue marketIssue) {
        final MarketIssueInfo marketIssueInfo = new MarketIssueInfo();
        marketIssueInfo.id = marketIssue.getId();
        marketIssueInfo.title = marketIssue.getTitle();
        marketIssueInfo.remarks = marketIssue.getRemarks();
        marketIssueInfo.resolve = marketIssue.getResolve();
        marketIssueInfo.author = marketIssue.getAuthor();
        marketIssueInfo.comments = marketIssue.getComments();
        return marketIssueInfo;
    }
}
